//
//  RootSeachModel.m
//  __PRODUCTNAME__
//
//  Created by Gollum on 16/09/21
//  Copyright (c) Gollum. All rights reserved.
//

#import "RootSeachModel.h"
#import "RootSearchData.h"

@implementation RootSeachModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [RootSearchData class]};
}
- (void)setValue:(id)value forKey:(NSString *)key{
    //记得super
    [super setValue:value forKey:key];
    
    NSMutableArray <RootSearchData *>*rootData = [NSMutableArray array];
    
    NSArray *valueArray = value;
    if ([key isEqualToString:@"data"]) {
        for (NSDictionary *dic in valueArray) {
            RootSearchData *myData = [RootSearchData modelWithDic:dic];
            [rootData addObject:myData];
        }
        _data = rootData;
    }
    
    
}


@end
